Skip to content

Bugfix: add missing stdlib.h include for rand() usage in ecma-builtin-math.c #2144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

martijnthe
Copy link
Contributor

rand () is being used in ecma-builtin-math.c, but the stdlib.h header is not being included.

…-math.c

JerryScript-DCO-1.0-Signed-off-by: Martijn The [email protected]
@martijnthe martijnthe force-pushed the add-missing-stdlib-include branch from b47acb0 to 27906f9 Compare December 8, 2017 12:22
@@ -14,6 +14,7 @@
*/

#include <math.h>
#include <stdlib.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm right, stdlib.h comes from this header, which will be included later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you're right, thanks!
The problem is in our stdlib.h header, it's missing rand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants